package easy;

public class a1304_和为零的N个唯一整数 {
    public int[] sumZero(int n) {
       int []ans=new int[n];
       int left=0;
       int right=n-1;
       while (left<right){
           ans[left]= -(n/2);
           ans[right]=n/2;
           left++;
           right--;
           n-=2;
       }
       return ans;
    }
}
